package com.wanmait.employment.manageController;

import com.github.pagehelper.PageInfo;
import com.wanmait.employment.entity.CompanyProductIntroduction;
import com.wanmait.employment.service.CompanyProductIntroductionService;
import com.wanmait.employment.util.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/manage/CompanyProductIntroduction/")
public class CompanyProductIntroductionController {
    @Resource
    private CompanyProductIntroductionService companyProductIntroductionService;
    @GetMapping("list")
    public AjaxResult List(String title,int pageNum,int pageSize){
        PageInfo<CompanyProductIntroduction>companyProductIntroductionPageInfo=companyProductIntroductionService.selectList(title,pageNum,pageSize);
        System.out.println(companyProductIntroductionPageInfo+"----");
        return AjaxResult.success("",companyProductIntroductionPageInfo);
    }
    @GetMapping("delete")
    public AjaxResult delete(Integer id){
        companyProductIntroductionService.delete(id);
        return AjaxResult.success();
    }
}
